package edu.biwu.sms;



import edu.biwu.sms.enum01.EnrollmentStatus;

import java.time.LocalDate;

public class MiddleStudent extends Stduent implements EveningStudy {
    private double historyScore;
    private  double physicsScore;


    public MiddleStudent(String stuId, String name, double chineseScore, double mathScore,  LocalDate enrollmentdates,double historyScore, double physicsScore) {
        super(stuId,name,chineseScore,mathScore,enrollmentdates);
        this.historyScore=historyScore;
        this.physicsScore=physicsScore;

    }

    public MiddleStudent(String stuId, String name, double chineseScore, double mathScore, double historyScore, double physicsScore) {
        super(stuId, name, chineseScore, mathScore);
        this.historyScore = historyScore;
        this.physicsScore = physicsScore;
    }

    public MiddleStudent(String stuId, String name, double chineseScore, double mathScore, double historyScore, double physicsScore, LocalDate enrollmentdates, String email, EnrollmentStatus enrollmentStatus) {
        super(stuId, name, chineseScore, mathScore, enrollmentdates,email,enrollmentStatus);
        this.historyScore = historyScore;
        this.physicsScore = physicsScore;
    }

    public double getHistoryScore() {
        return historyScore;
    }

    public void setHistoryScore(double historyScore) {
        this.historyScore = historyScore;
    }

    public double getPhysicsScore() {
        return physicsScore;
    }

    public void setPhysicsScore(double physicsScore) {
        this.physicsScore = physicsScore;
    }

    @Override
    public void eveningStudy() {
        System.out.println("中学生"+getName()+"正在上晚自习");
    }
    @Override
    public double geTotalSocre(){
    return super.geTotalSocre()+physicsScore+historyScore;
    }

    public MiddleStudent(String stuId, String name, double chineseScore, double mathScore, LocalDate enrollmentdates, String email, double historyScore, double physicsScore) {
        super(stuId, name, chineseScore, mathScore, enrollmentdates, email);
        this.historyScore = historyScore;
        this.physicsScore = physicsScore;
    }

    @Override
    public String toString() {
        return getStuId()+getName()+getHistoryScore()+getPhysicsScore()+getChineseScore()+getMathScore()+getEmail()+getEnrollmentdates()+geTotalSocre()+getAvatar()+getEnrollmentStatus();
    }

}
